﻿@model AutomatedTestDataManagement.Models.Site

@{
    ViewBag.Title = "Delete";
}

<h2>Delete</h2>

<h3>Are you sure you want to delete this site?</h3>
<fieldset>
    <legend>Site</legend>


    <div class="display-label">
         @Html.LabelFor(model => model.SiteName, "Site Name")
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.SiteName)
    </div>

    <div class="display-label">
         @Html.LabelFor(model => model.SiteURL, "URL")
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.SiteURL)
    </div>

    <div class="display-label">
         @Html.LabelFor(model => model.SiteRoot, "Site Root")
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.SiteRoot)
    </div>

    <div class="display-label">
         @Html.LabelFor(model => model.SiteDescription, "Site Description")
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.SiteDescription)
    </div>
</fieldset>
@using (Html.BeginForm()) {
    <div>
        @Html.ValidationSummary(true)
        @if(ViewContext.ViewData.ModelState.IsValid)
        {
            <input type="submit" value="Delete" /> 
        }
        else
        {
            <table>
                <tr>
                    <th>Site Name</th>
                    <th>URL</th>
                    <th></th>
                </tr>
                @Html.EditorFor(m => m.SitesPages, new { deletePage = Model.DataID })
            </table>
        }
    </div>
}
<div>
    @Html.Partial("_NavigationManagementNav")
</div>
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
